package com.cndym.adapterForMobile.mobile.function;

import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.cndym.adapterForMobile.BaseFunction;
import com.cndym.exception.ErrCode;
import com.cndym.utils.Utils;
import com.zch.matches.producer.ISportMatchesProducer;

/***
 * 赔率详情
 * @author Du Fangxing
 *
 */
@Component
public class OddsDetailSportMatchesFunc extends BaseFunction {
	private Logger logger = Logger.getLogger(getClass());

	@Autowired
	private ISportMatchesProducer sportMatchesProducer;
	@Override
	public Map<String, String> function(Map<String, String> map) {
		Map<String, String> param = paraMap(map);
		String lotteryCode = param.get("lotteryCode");
		String gameId = param.get("gameId");
		String betType= param.get("betType");
		String comId = param.get("comId");
		if(Utils.isEmpty(lotteryCode)){
			return noBodyReMap(ErrCode.E3300);
		}
		if(Utils.isEmpty(gameId)){
			return noBodyReMap(ErrCode.E4501);
		}
		if(Utils.isEmpty(betType)){
			return noBodyReMap(ErrCode.E4507);
		}
		Map<String, Object> resMap = null;
		resMap=sportMatchesProducer.oddsDetailSportMatches(param);
		return successObj(resMap);
	}
	
	
}
